Skip to content

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Sep 29, 2025

Upstream patches proposed to solve #6068

Draft PR for testing.

@6by9 6by9 force-pushed the rpi-6.12.y-tc358743 branch from 5fd67a1 to 2679781 Compare September 29, 2025 15:44
@6by9 6by9 marked this pull request as ready for review October 13, 2025 17:28
Upstream series https://lore.kernel.org/linux-media/[email protected]/

The subdev format documentation has a subsection describing how to use
the media bus pixel codes for serial buses. While it describes the
sampling part well, it doesn't really describe the current convention
used for the components order.

Let's improve that.

Signed-off-by: Maxime Ripard <[email protected]>
Upstream series https://lore.kernel.org/linux-media/[email protected]/

The tc358743 is an HDMI to MIPI-CSI2 bridge. It can output all three
HDMI 1.4 video formats: RGB 4:4:4, YCbCr 4:2:2, and YCbCr 4:4:4.

RGB 4:4:4 is converted to the MIPI-CSI2 RGB888 video format, and listed
in the driver as MEDIA_BUS_FMT_RGB888_1X24.

Most CSI2 receiver drivers then map MEDIA_BUS_FMT_RGB888_1X24 to
V4L2_PIX_FMT_RGB24.

However, V4L2_PIX_FMT_RGB24 is defined as having its color components in
the R, G and B order, from left to right. MIPI-CSI2 however defines the
RGB888 format with blue first.

This essentially means that the R and B will be swapped compared to what
V4L2_PIX_FMT_RGB24 defines.

The proper MBUS format would be BGR888, so let's use that.

Fixes: d32d986 ("[media] Driver for Toshiba TC358743 HDMI to CSI-2 bridge")
Signed-off-by: Maxime Ripard <[email protected]>
@6by9 6by9 force-pushed the rpi-6.12.y-tc358743 branch from 2679781 to 63d7ac7 Compare October 13, 2025 17:28
@6by9
Copy link
Contributor Author

6by9 commented Oct 13, 2025

Tested and does the right thing.

I'm happy for this to be merged now, so draft status dropped.

@pelwell pelwell merged commit 080d4e0 into raspberrypi:rpi-6.12.y Oct 14, 2025
11 of 12 checks passed
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Oct 17, 2025
kernel: Add config settings and i2c-sensor support for the TMP117
See: raspberrypi/linux#7083

kernel: Upstream patches for TC358743 colour swap
See: raspberrypi/linux#7070

kernel: media: ov9282: Add external trigger mode support
See: raspberrypi/linux#6954

kernel: Improve the RP1 DMA channel allocation scheme
See: raspberrypi/linux#7089
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Oct 17, 2025
kernel: Add config settings and i2c-sensor support for the TMP117
See: raspberrypi/linux#7083

kernel: Upstream patches for TC358743 colour swap
See: raspberrypi/linux#7070

kernel: media: ov9282: Add external trigger mode support
See: raspberrypi/linux#6954

kernel: Improve the RP1 DMA channel allocation scheme
See: raspberrypi/linux#7089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants